﻿using LuckyShell.ShellOrders;

namespace LuckyShell.ShellValues;

public class AppValue(string s) : ShellValue
{
    public object GetValue(ref VariateManager manager)
    {
        var i = new InterpolateStringValue(Order);
        var o = i.GetValue(ref manager);
        if (o is string s)
            return manager.OrderString(s);

        return new VoidValue();
    }

    private string Order { get; set; } = s;

    public override string ToString() => Order;
}